﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace shenghua.Migrations
{
    public partial class addentity18 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "CommentId",
                table: "Comments",
                newName: "ParentCommentId");

            migrationBuilder.AddColumn<long>(
                name: "MemberId",
                table: "OrderDetails",
                nullable: false,
                defaultValue: 0L);

            migrationBuilder.AddColumn<string>(
                name: "OrderNumber",
                table: "OrderDetails",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "OrderNumber",
                table: "Comments",
                nullable: true);

            migrationBuilder.AddColumn<float>(
                name: "OrderEvaluate_RateValue",
                table: "Comments",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Pictures_StringValue",
                table: "Comments",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "MemberId",
                table: "OrderDetails");

            migrationBuilder.DropColumn(
                name: "OrderNumber",
                table: "OrderDetails");

            migrationBuilder.DropColumn(
                name: "OrderNumber",
                table: "Comments");

            migrationBuilder.DropColumn(
                name: "OrderEvaluate_RateValue",
                table: "Comments");

            migrationBuilder.DropColumn(
                name: "Pictures_StringValue",
                table: "Comments");

            migrationBuilder.RenameColumn(
                name: "ParentCommentId",
                table: "Comments",
                newName: "CommentId");
        }
    }
}
